package com.cyc.service.impl;

import com.cyc.dao.OrderDetailMapper;
import com.cyc.entity.OrderDetail;
import com.cyc.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrderDetailServiceImpl implements OrderDetailService {

    @Autowired
    OrderDetailMapper orderDetailMapper;
    @Override
    public List<OrderDetail> selectAll(Map<String, Object> map) {
        return orderDetailMapper.selectAll(map);
    }

    @Override
    public int deleteByProductId(Integer id) {
        return orderDetailMapper.deleteByProductId(id);
    }

    @Override
    public int deleteByOrderId(Integer id) {
        return orderDetailMapper.deleteByOrderId(id);
    }

    @Override
    public int insert(OrderDetail record) {
        return orderDetailMapper.insert(record);
    }
}
